package com.binyouwei.udp_lib.factory

import androidx.annotation.NonNull
import com.binyouwei.udp_lib.ReceiveMessageInterface

/**
 * @author 宾有为
 * @date 2024/6/5 20:30
 * @link https://blog.csdn.net/baidu_41616022?type=blog
 * @describe：udp工厂类
 **/
interface UdpFactory {

    /**
     * 初始化udp
     */
    fun initUdp()

    /**
     * 销毁udp
     */
    fun destroyUdp()

    /**
     * 向已连接的设备发送消息
     */
    fun sendMessage(ip: String, message: String)

    /**
     * 收到已连接的设备消息
     */
    fun onReceiveMessageListener(ip : String, receiveMessage: ReceiveMessageInterface)
}